summary refs log tree commit diff stats
path: root/data/maps/the_owl/rooms/R2C2 Bottom.txtpb
blob: e7eb9e48f3404889a527c0da4fd4551c74965ef1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
name: "R2C2 Bottom"
display_name: "Owl"
panels {
  name: "FOUL"
  path: "Panels/Bottom Mid/owl_11"
  clue: "foul"
  answer: "owl"
  symbols: ZERO
}
ports {
  name: "GALLERY"
  path: "Components/Warps/worldport"
  orientation: "south"
  # Note that this port is accessible from the other side in the Z1 room. Hmm.
}
span> #include <cctype> #include "pronunciation.h" namespace verbly { namespace generator { int form::nextId_ = 0; form::form(std::string text) : id_(nextId_++), text_(text), complexity_(std::count(std::begin(text), std::end(text), ' ') + 1), proper_(std::any_of(std::begin(text), std::end(text), ::isupper)), length_(text.length()) { } void form::addPronunciation(const pronunciation& p) { pronunciations_.insert(&p); } hatkirby::database& operator<<(hatkirby::database& db, const form& arg) { // Serialize the form first. { db.insertIntoTable( "forms", { { "form_id", arg.getId() }, { "form", arg.getText() }, { "complexity", arg.getComplexity() }, { "proper", arg.isProper() }, { "length", arg.getLength() } }); } // Then, serialize the form/pronunciation relationship. for (const pronunciation* p : arg.getPronunciations()) { db.insertIntoTable( "forms_pronunciations", { { "form_id", arg.getId() }, { "pronunciation_id", p->getId() } }); } return db; } }; };